# $Id$
# Maintainer: Tom Killian <tom@archlinux.org>
# Committer: dorphell <dorphell@archlinux.org>

pkgname=libtheora
pkgver=1.1.1
pkgrel=3
pkgdesc="An open video codec developed by the Xiph.org"
arch=('i686' 'x86_64')
url="http://www.xiph.org"
license=('BSD')
depends=('libogg')
makedepends=('libvorbis')
source=(http://downloads.xiph.org/releases/theora/libtheora-${pkgver}.tar.bz2
        libtheora-1.1.1-libpng16.patch)
md5sums=('292ab65cedd5021d6b7ddd117e07cd8e'
         '08edd81c7a1be2c4edfd2cd3c112a8c6')
sha1sums=('8dcaa8e61cd86eb1244467c0b64b9ddac04ae262'
          'c3f03dbaa5c6459846ce79ea904db1b66971878d')

prepare() {
  cd ${pkgname}-${pkgver}
  patch -Np0 -i ../libtheora-1.1.1-libpng16.patch
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --enable-shared --disable-static
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install

  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 LICENSE COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
}
